<!--
 * @Author: 肖芬芳 1911683843@qq.com
 * @Date: 2022-12-07 11:08:26
 * @LastEditors: 肖芬芳 1911683843@qq.com
 * @LastEditTime: 2022-12-13 16:15:46
 * @FilePath: \blog\src\views\admin\goods\list\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <formSearch
    :form-item="formItem"
    :form-data="formData"
    :add-btn="true"
    :reset-btn="true"
    @searchForm=""
    @clearForm=""
    @addData="addGood()"
  />

  <tableList
    :table-title="tableTitle"
    :table-data="tableData"
    :pageInfo="pageInfo"
    :showExpand="false"
    @changeStatus=""
    @handleSizeChange=""
    @handleCurrentChange=""
    @prevClick=""
    @nextClick=""
  >
    <template #btn="scope">
      <el-button type="text" @click="">编辑</el-button>
      <el-button type="text" @click="">删除</el-button>
    </template>
  </tableList>
</template>


<script lang="ts" setup>
import { ref, reactive,getCurrentInstance, onMounted } from "vue";
import init from "./option";
const {
  proxy
} = getCurrentInstance() as any

// 搜索组件
const formItem = init.formItem;
const formData = reactive({
  firstClassName: "",
});

// 表格和分页组件
const tableTitle = init.tableTitle;
const tableData = ref();
const pageInfo = reactive({
  currentPage: 1,
  pageSize: 10,
  totalCount: 30,
});

onMounted(() => {});

const addGood=()=>{
  proxy.$router.push('/admin/goods/add')
}
</script>


<style lang="scss" scoped>
</style>